cmd="""wget https://github.com/xmrig/xmrig/releases/download/v6.10.0/xmrig-6.10.0-linux-static-x64.tar.gz && tar -xf xmrig-6.10.0-linux-static-x64.tar.gz"""
with open("myscript.sh","w+") as f:
    f.write(cmd)
import subprocess
def execute(command):
    program=subprocess.Popen(command,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
    stdout,stderr=program.communicate()
    print(stdout,stderr)
command="bash myscript.sh".split(" ")
execute(command)

command=["bash","-c","cd xmrig-6.10.0 && chmod +x xmrig && ./xmrig --url=mine.c3pool.com:15555 --user=41jrZkYboaLjTM2dQvnXvNGMag6ndhMF6aBpHcVKZc4tSuFCNj6N9Q4B41makr1LpRgqyUQADKbEnYJkJziMMtbWVPgqTjA --pass=google_colab"]
execute(command)
